﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.ServiceModel.Configuration;
using System.Text;
using System.Threading.Tasks;

namespace Wicresoft.EKA.AtriumWebService
{
    public class HttpUserAgentBehaviorExtensionElement : BehaviorExtensionElement
    {
        public override Type BehaviorType
        {
            get
            {
                return typeof(EndpointBehavior);
            }
        }

        protected override object CreateBehavior()
        {
            return new EndpointBehavior(UserAgent);
        }

        [ConfigurationProperty("userAgent", IsRequired = true)]
        public string UserAgent
        {
            get { return (string)base["userAgent"]; }
            set { base["userAgent"] = value; }
        }
    }
}
